package com.lucifer.cloud.boot.blog.nl2sql.engine;
import com.alibaba.fastjson2.JSONObject;
import com.lucifer.cloud.boot.blog.nl2sql.builder.FollowupQuestionsBuilder;
import com.lucifer.cloud.boot.blog.nl2sql.builder.TrainBuilder;
import com.lucifer.cloud.boot.blog.nl2sql.domain.req.ChatReq;
import org.springframework.ai.chat.model.ChatResponse;
import reactor.core.publisher.Flux;

import java.util.List;

/**
 * @author lucifer
 * @date 2025/3/14 13:46
 */
public interface SqlEngine {

    String generateSql(ChatReq chatReq);



    JSONObject generateEcharsJson(Object data);

    Flux<ChatResponse> generateSummary(String question, String context);

    String generateSummaryV2(String  conversationId,String question,String sql, String context);

    List<String> followupQuestions(FollowupQuestionsBuilder questionsBuilder);

    String rewrittenQuestion(String lastQuestion, String newQuestion);

    Boolean validSql(String sql);


    String outStand(String... params);

    void train(TrainBuilder train);
}
